3.97 \(\int \frac {\sin (c+d x)}{(a+b \sin ^2(c+d x))^2} \, dx\)

Optimal. Leaf size=74 \[ -\frac {\cos (c+d x)}{2 d (a+b) \left (a-b \cos ^2(c+d x)+b\right )}-\frac {\tanh ^{-1}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{2 \sqrt {b} d (a+b)^{3/2}} \]

[Out]

-1/2*cos(d*x+c)/(a+b)/d/(a+b-b*cos(d*x+c)^2)-1/2*arctanh(cos(d*x+c)*b^(1/2)/(a+b)^(1/2))/(a+b)^(3/2)/d/b^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3186, 199, 208} \[ -\frac {\cos (c+d x)}{2 d (a+b) \left (a-b \cos ^2(c+d x)+b\right )}-\frac {\tanh ^{-1}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{2 \sqrt {b} d (a+b)^{3/2}} \]

Antiderivative was successfully verified.

[In]

Int[Sin[c + d*x]/(a + b*Sin[c + d*x]^2)^2,x]

[Out]

-ArcTanh[(Sqrt[b]*Cos[c + d*x])/Sqrt[a + b]]/(2*Sqrt[b]*(a + b)^(3/2)*d) - Cos[c + d*x]/(2*(a + b)*d*(a + b -
b*Cos[c + d*x]^2))

Rule 199

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Simp[(x*(a + b*x^n)^(p + 1))/(a*n*(p + 1)), x] + Dist[(n*(p +
 1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && LtQ[p, -1] && (In
tegerQ[2*p] || (n == 2 && IntegerQ[4*p]) || (n == 2 && IntegerQ[3*p]) || Denominator[p + 1/n] < Denominator[p]
)

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 3186

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos
[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \frac {\sin (c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {1}{\left (a+b-b x^2\right )^2} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {\cos (c+d x)}{2 (a+b) d \left (a+b-b \cos ^2(c+d x)\right )}-\frac {\operatorname {Subst}\left (\int \frac {1}{a+b-b x^2} \, dx,x,\cos (c+d x)\right )}{2 (a+b) d}\\ &=-\frac {\tanh ^{-1}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{2 \sqrt {b} (a+b)^{3/2} d}-\frac {\cos (c+d x)}{2 (a+b) d \left (a+b-b \cos ^2(c+d x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.29, size = 149, normalized size = 2.01 \[ \frac {-\frac {2 \cos (c+d x)}{2 a-b \cos (2 (c+d x))+b}+\frac {\tan ^{-1}\left (\frac {\sqrt {b}-i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right )}{\sqrt {b} \sqrt {-a-b}}+\frac {\tan ^{-1}\left (\frac {\sqrt {b}+i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right )}{\sqrt {b} \sqrt {-a-b}}}{2 d (a+b)} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[c + d*x]/(a + b*Sin[c + d*x]^2)^2,x]

[Out]

(ArcTan[(Sqrt[b] - I*Sqrt[a]*Tan[(c + d*x)/2])/Sqrt[-a - b]]/(Sqrt[-a - b]*Sqrt[b]) + ArcTan[(Sqrt[b] + I*Sqrt
[a]*Tan[(c + d*x)/2])/Sqrt[-a - b]]/(Sqrt[-a - b]*Sqrt[b]) - (2*Cos[c + d*x])/(2*a + b - b*Cos[2*(c + d*x)]))/
(2*(a + b)*d)

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 282, normalized size = 3.81 \[ \left [\frac {{\left (b \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt {a b + b^{2}} \log \left (-\frac {b \cos \left (d x + c\right )^{2} - 2 \, \sqrt {a b + b^{2}} \cos \left (d x + c\right ) + a + b}{b \cos \left (d x + c\right )^{2} - a - b}\right ) + 2 \, {\left (a b + b^{2}\right )} \cos \left (d x + c\right )}{4 \, {\left ({\left (a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{3} b + 3 \, a^{2} b^{2} + 3 \, a b^{3} + b^{4}\right )} d\right )}}, \frac {{\left (b \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt {-a b - b^{2}} \arctan \left (\frac {\sqrt {-a b - b^{2}} \cos \left (d x + c\right )}{a + b}\right ) + {\left (a b + b^{2}\right )} \cos \left (d x + c\right )}{2 \, {\left ({\left (a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{3} b + 3 \, a^{2} b^{2} + 3 \, a b^{3} + b^{4}\right )} d\right )}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)/(a+b*sin(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

[1/4*((b*cos(d*x + c)^2 - a - b)*sqrt(a*b + b^2)*log(-(b*cos(d*x + c)^2 - 2*sqrt(a*b + b^2)*cos(d*x + c) + a +
 b)/(b*cos(d*x + c)^2 - a - b)) + 2*(a*b + b^2)*cos(d*x + c))/((a^2*b^2 + 2*a*b^3 + b^4)*d*cos(d*x + c)^2 - (a
^3*b + 3*a^2*b^2 + 3*a*b^3 + b^4)*d), 1/2*((b*cos(d*x + c)^2 - a - b)*sqrt(-a*b - b^2)*arctan(sqrt(-a*b - b^2)
*cos(d*x + c)/(a + b)) + (a*b + b^2)*cos(d*x + c))/((a^2*b^2 + 2*a*b^3 + b^4)*d*cos(d*x + c)^2 - (a^3*b + 3*a^
2*b^2 + 3*a*b^3 + b^4)*d)]

________________________________________________________________________________________

giac [A]  time = 0.16, size = 79, normalized size = 1.07 \[ \frac {\arctan \left (\frac {b \cos \left (d x + c\right )}{\sqrt {-a b - b^{2}}}\right )}{2 \, \sqrt {-a b - b^{2}} {\left (a + b\right )} d} + \frac {\cos \left (d x + c\right )}{2 \, {\left (b \cos \left (d x + c\right )^{2} - a - b\right )} {\left (a + b\right )} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)/(a+b*sin(d*x+c)^2)^2,x, algorithm="giac")

[Out]

1/2*arctan(b*cos(d*x + c)/sqrt(-a*b - b^2))/(sqrt(-a*b - b^2)*(a + b)*d) + 1/2*cos(d*x + c)/((b*cos(d*x + c)^2
 - a - b)*(a + b)*d)

________________________________________________________________________________________

maple [A]  time = 0.22, size = 68, normalized size = 0.92 \[ \frac {\frac {\cos \left (d x +c \right )}{2 \left (a +b \right ) \left (b \left (\cos ^{2}\left (d x +c \right )\right )-a -b \right )}-\frac {\arctanh \left (\frac {\cos \left (d x +c \right ) b}{\sqrt {\left (a +b \right ) b}}\right )}{2 \left (a +b \right ) \sqrt {\left (a +b \right ) b}}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(d*x+c)/(a+b*sin(d*x+c)^2)^2,x)

[Out]

1/d*(1/2*cos(d*x+c)/(a+b)/(b*cos(d*x+c)^2-a-b)-1/2/(a+b)/((a+b)*b)^(1/2)*arctanh(cos(d*x+c)*b/((a+b)*b)^(1/2))
)

________________________________________________________________________________________

maxima [A]  time = 0.46, size = 98, normalized size = 1.32 \[ \frac {\frac {2 \, \cos \left (d x + c\right )}{{\left (a b + b^{2}\right )} \cos \left (d x + c\right )^{2} - a^{2} - 2 \, a b - b^{2}} + \frac {\log \left (\frac {b \cos \left (d x + c\right ) - \sqrt {{\left (a + b\right )} b}}{b \cos \left (d x + c\right ) + \sqrt {{\left (a + b\right )} b}}\right )}{\sqrt {{\left (a + b\right )} b} {\left (a + b\right )}}}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)/(a+b*sin(d*x+c)^2)^2,x, algorithm="maxima")

[Out]

1/4*(2*cos(d*x + c)/((a*b + b^2)*cos(d*x + c)^2 - a^2 - 2*a*b - b^2) + log((b*cos(d*x + c) - sqrt((a + b)*b))/
(b*cos(d*x + c) + sqrt((a + b)*b)))/(sqrt((a + b)*b)*(a + b)))/d

________________________________________________________________________________________

mupad [B]  time = 0.11, size = 62, normalized size = 0.84 \[ -\frac {\cos \left (c+d\,x\right )}{2\,d\,\left (a+b\right )\,\left (-b\,{\cos \left (c+d\,x\right )}^2+a+b\right )}-\frac {\mathrm {atanh}\left (\frac {\sqrt {b}\,\cos \left (c+d\,x\right )}{\sqrt {a+b}}\right )}{2\,\sqrt {b}\,d\,{\left (a+b\right )}^{3/2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)/(a + b*sin(c + d*x)^2)^2,x)

[Out]

- cos(c + d*x)/(2*d*(a + b)*(a + b - b*cos(c + d*x)^2)) - atanh((b^(1/2)*cos(c + d*x))/(a + b)^(1/2))/(2*b^(1/
2)*d*(a + b)^(3/2))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)/(a+b*sin(d*x+c)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________